.problem-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.problem-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.problem-title {
  font-size: 24px;
  color: #333;
  margin: 0 0 16px;
}

.problem-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.time-limit,
.memory-limit {
  color: #666;
  font-size: 14px;
}

.difficulty-tag {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 2px;
  font-size: 12px;
  line-height: 20px;
  border: 1px solid;
}

.difficulty-tag.简单 {
  color: #52c41a;
  background: #f6ffed;
  border-color: #b7eb8f;
}

.difficulty-tag.中等 {
  color: #fa8c16;
  background: #fff7e6;
  border-color: #ffd591;
}

.difficulty-tag.困难 {
  color: #f5222d;
  background: #fff1f0;
  border-color: #ffa39e;
}

.source-tag {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 8px;
  border-radius: 2px;
  background: #f5f5f5;
  color: #666;
  font-size: 12px;
}

.problem-section {
  margin-bottom: 24px;
}

.problem-section h2 {
  font-size: 18px;
  color: #333;
  margin: 0 0 12px;
  font-weight: 500;
}

.section-content {
  color: #333;
  line-height: 1.6;
  white-space: pre-wrap;
}

.samples {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sample-case {
  border: 1px solid #eee;
  border-radius: 4px;
}

.sample-header {
  padding: 8px 16px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  color: #666;
  font-size: 14px;
}

.sample-content {
  padding: 16px;
}

.sample-input,
.sample-output {
  margin-bottom: 12px;
}

.sample-input:last-child,
.sample-output:last-child {
  margin-bottom: 0;
}

.sample-label {
  color: #666;
  margin-bottom: 4px;
}

pre {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 4px;
  margin: 0;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
}

.editor-section {
  margin-top: 32px;
  border-top: 1px solid #eee;
  padding-top: 24px;
}

.submit-section {
  margin-top: 32px;
  text-align: center;
}

.submit-btn {
  padding: 8px 24px;
  font-size: 16px;
  color: white;
  background: #1890ff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.submit-btn:hover {
  background: #40a9ff;
}

.not-found {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

@media (max-width: 768px) {
  .problem-detail {
    padding: 16px;
  }

  .problem-title {
    font-size: 20px;
  }

  .problem-meta {
    gap: 8px;
  }

  pre {
    padding: 8px;
    font-size: 14px;
  }

  .editor-section {
    margin-top: 24px;
    padding-top: 16px;
  }
}
